package com.bookstore.bauhinia.service;

import com.bookstore.bauhinia.pojo.Book;
import com.bookstore.bauhinia.pojo.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(value = "book-service")
public interface BookFeignService {
    @PostMapping("/book/update")
    public CommonResult updateBook(Book record);

    @GetMapping("/book/delete/{id}")
    public CommonResult deleteBookById(@PathVariable("id") int id);

    @GetMapping("/book/get/{id}")
    public CommonResult getBookById(@PathVariable("id") int id);

    @PostMapping("/book/insert")
    public CommonResult insertBook(Book record);
}
